Imports Cor = Enhancements.Core
Imports Ref = System.Reflection
Imports Sys = System

Namespace Enhancements.Core.Logging
    ''' <summary>Represents an association between a level and a type.</summary>
    Public NotInheritable Class LevelMappingType
        Inherits LevelMapping

        ''' <summary>Initializes a LevelMappingType instance.</summary>
        ''' <param name="_type">Type to use by the instance.</param>
        ''' <param name="_level">Level to use by the instance.</param>
        ''' <param name="_overridesDescendants">OverridesDescendants to use by the instance.</param>
        ''' <exception cref="IsNullException">_type is null.</exception>
        Public Sub New(ByVal _type As Sys.Type, ByVal _level As Level, ByVal _overridesDescendants As Boolean)
            MyBase.New(_level, _overridesDescendants)
            Type = _type
        End Sub

        Private __Type As Sys.Type = Nothing
        ''' <summary>Gets the type used by the instance. The default value is null.</summary>
        ''' <exception cref="IsNullException">The value is null (while setting).</exception>
        Public Property Type() As Sys.Type
            Get
                Return __Type
            End Get
            Private Set(ByVal _value As Sys.Type)
                Cor.___Assert.___IsNullNot("Type._value", _value, True)

                __Type = _value
            End Set
        End Property

    End Class
End Namespace
